package cn.smart.pojo;

import java.util.ArrayList;
import java.util.List;

public class ResourceExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ResourceExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRidIsNull() {
            addCriterion("rId is null");
            return (Criteria) this;
        }

        public Criteria andRidIsNotNull() {
            addCriterion("rId is not null");
            return (Criteria) this;
        }

        public Criteria andRidEqualTo(Integer value) {
            addCriterion("rId =", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotEqualTo(Integer value) {
            addCriterion("rId <>", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThan(Integer value) {
            addCriterion("rId >", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThanOrEqualTo(Integer value) {
            addCriterion("rId >=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThan(Integer value) {
            addCriterion("rId <", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThanOrEqualTo(Integer value) {
            addCriterion("rId <=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidIn(List<Integer> values) {
            addCriterion("rId in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotIn(List<Integer> values) {
            addCriterion("rId not in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidBetween(Integer value1, Integer value2) {
            addCriterion("rId between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotBetween(Integer value1, Integer value2) {
            addCriterion("rId not between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andRnameIsNull() {
            addCriterion("rName is null");
            return (Criteria) this;
        }

        public Criteria andRnameIsNotNull() {
            addCriterion("rName is not null");
            return (Criteria) this;
        }

        public Criteria andRnameEqualTo(String value) {
            addCriterion("rName =", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameNotEqualTo(String value) {
            addCriterion("rName <>", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameGreaterThan(String value) {
            addCriterion("rName >", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameGreaterThanOrEqualTo(String value) {
            addCriterion("rName >=", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameLessThan(String value) {
            addCriterion("rName <", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameLessThanOrEqualTo(String value) {
            addCriterion("rName <=", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameLike(String value) {
            addCriterion("rName like", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameNotLike(String value) {
            addCriterion("rName not like", value, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameIn(List<String> values) {
            addCriterion("rName in", values, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameNotIn(List<String> values) {
            addCriterion("rName not in", values, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameBetween(String value1, String value2) {
            addCriterion("rName between", value1, value2, "rname");
            return (Criteria) this;
        }

        public Criteria andRnameNotBetween(String value1, String value2) {
            addCriterion("rName not between", value1, value2, "rname");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureIsNull() {
            addCriterion("rAirTemperature is null");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureIsNotNull() {
            addCriterion("rAirTemperature is not null");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureEqualTo(Integer value) {
            addCriterion("rAirTemperature =", value, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureNotEqualTo(Integer value) {
            addCriterion("rAirTemperature <>", value, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureGreaterThan(Integer value) {
            addCriterion("rAirTemperature >", value, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureGreaterThanOrEqualTo(Integer value) {
            addCriterion("rAirTemperature >=", value, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureLessThan(Integer value) {
            addCriterion("rAirTemperature <", value, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureLessThanOrEqualTo(Integer value) {
            addCriterion("rAirTemperature <=", value, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureIn(List<Integer> values) {
            addCriterion("rAirTemperature in", values, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureNotIn(List<Integer> values) {
            addCriterion("rAirTemperature not in", values, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureBetween(Integer value1, Integer value2) {
            addCriterion("rAirTemperature between", value1, value2, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairtemperatureNotBetween(Integer value1, Integer value2) {
            addCriterion("rAirTemperature not between", value1, value2, "rairtemperature");
            return (Criteria) this;
        }

        public Criteria andRairhumidityIsNull() {
            addCriterion("rAirHumidity is null");
            return (Criteria) this;
        }

        public Criteria andRairhumidityIsNotNull() {
            addCriterion("rAirHumidity is not null");
            return (Criteria) this;
        }

        public Criteria andRairhumidityEqualTo(Integer value) {
            addCriterion("rAirHumidity =", value, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityNotEqualTo(Integer value) {
            addCriterion("rAirHumidity <>", value, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityGreaterThan(Integer value) {
            addCriterion("rAirHumidity >", value, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityGreaterThanOrEqualTo(Integer value) {
            addCriterion("rAirHumidity >=", value, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityLessThan(Integer value) {
            addCriterion("rAirHumidity <", value, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityLessThanOrEqualTo(Integer value) {
            addCriterion("rAirHumidity <=", value, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityIn(List<Integer> values) {
            addCriterion("rAirHumidity in", values, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityNotIn(List<Integer> values) {
            addCriterion("rAirHumidity not in", values, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityBetween(Integer value1, Integer value2) {
            addCriterion("rAirHumidity between", value1, value2, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRairhumidityNotBetween(Integer value1, Integer value2) {
            addCriterion("rAirHumidity not between", value1, value2, "rairhumidity");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessIsNull() {
            addCriterion("rSoilDryness is null");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessIsNotNull() {
            addCriterion("rSoilDryness is not null");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessEqualTo(Integer value) {
            addCriterion("rSoilDryness =", value, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessNotEqualTo(Integer value) {
            addCriterion("rSoilDryness <>", value, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessGreaterThan(Integer value) {
            addCriterion("rSoilDryness >", value, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessGreaterThanOrEqualTo(Integer value) {
            addCriterion("rSoilDryness >=", value, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessLessThan(Integer value) {
            addCriterion("rSoilDryness <", value, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessLessThanOrEqualTo(Integer value) {
            addCriterion("rSoilDryness <=", value, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessIn(List<Integer> values) {
            addCriterion("rSoilDryness in", values, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessNotIn(List<Integer> values) {
            addCriterion("rSoilDryness not in", values, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessBetween(Integer value1, Integer value2) {
            addCriterion("rSoilDryness between", value1, value2, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRsoildrynessNotBetween(Integer value1, Integer value2) {
            addCriterion("rSoilDryness not between", value1, value2, "rsoildryness");
            return (Criteria) this;
        }

        public Criteria andRlikeIsNull() {
            addCriterion("rLike is null");
            return (Criteria) this;
        }

        public Criteria andRlikeIsNotNull() {
            addCriterion("rLike is not null");
            return (Criteria) this;
        }

        public Criteria andRlikeEqualTo(String value) {
            addCriterion("rLike =", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeNotEqualTo(String value) {
            addCriterion("rLike <>", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeGreaterThan(String value) {
            addCriterion("rLike >", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeGreaterThanOrEqualTo(String value) {
            addCriterion("rLike >=", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeLessThan(String value) {
            addCriterion("rLike <", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeLessThanOrEqualTo(String value) {
            addCriterion("rLike <=", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeLike(String value) {
            addCriterion("rLike like", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeNotLike(String value) {
            addCriterion("rLike not like", value, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeIn(List<String> values) {
            addCriterion("rLike in", values, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeNotIn(List<String> values) {
            addCriterion("rLike not in", values, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeBetween(String value1, String value2) {
            addCriterion("rLike between", value1, value2, "rlike");
            return (Criteria) this;
        }

        public Criteria andRlikeNotBetween(String value1, String value2) {
            addCriterion("rLike not between", value1, value2, "rlike");
            return (Criteria) this;
        }

        public Criteria andRmarkIsNull() {
            addCriterion("rMark is null");
            return (Criteria) this;
        }

        public Criteria andRmarkIsNotNull() {
            addCriterion("rMark is not null");
            return (Criteria) this;
        }

        public Criteria andRmarkEqualTo(String value) {
            addCriterion("rMark =", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkNotEqualTo(String value) {
            addCriterion("rMark <>", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkGreaterThan(String value) {
            addCriterion("rMark >", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkGreaterThanOrEqualTo(String value) {
            addCriterion("rMark >=", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkLessThan(String value) {
            addCriterion("rMark <", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkLessThanOrEqualTo(String value) {
            addCriterion("rMark <=", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkLike(String value) {
            addCriterion("rMark like", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkNotLike(String value) {
            addCriterion("rMark not like", value, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkIn(List<String> values) {
            addCriterion("rMark in", values, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkNotIn(List<String> values) {
            addCriterion("rMark not in", values, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkBetween(String value1, String value2) {
            addCriterion("rMark between", value1, value2, "rmark");
            return (Criteria) this;
        }

        public Criteria andRmarkNotBetween(String value1, String value2) {
            addCriterion("rMark not between", value1, value2, "rmark");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}